package com.iva.model;

// Generated 11-03-2013 09:07:49 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbRecord generated by hbm2java
 */
@Entity
@Table(name = "tb_record", catalog = "new_escool")
public class TbRecord implements java.io.Serializable {

	private Integer idRecordExpediente;
	private TbTipoRecord tbTipoRecord;
	private String emisario;
	private String fecha;
	private String nombreRecord;
	private Set<TbExpedienteHasRecord> tbExpedienteHasRecords = new HashSet<TbExpedienteHasRecord>(
			0);

	public TbRecord() {
	}

	public TbRecord(TbTipoRecord tbTipoRecord) {
		this.tbTipoRecord = tbTipoRecord;
	}

	public TbRecord(TbTipoRecord tbTipoRecord, String emisario, String fecha,
			String nombreRecord,
			Set<TbExpedienteHasRecord> tbExpedienteHasRecords) {
		this.tbTipoRecord = tbTipoRecord;
		this.emisario = emisario;
		this.fecha = fecha;
		this.nombreRecord = nombreRecord;
		this.tbExpedienteHasRecords = tbExpedienteHasRecords;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_record_expediente", unique = true, nullable = false)
	public Integer getIdRecordExpediente() {
		return this.idRecordExpediente;
	}

	public void setIdRecordExpediente(Integer idRecordExpediente) {
		this.idRecordExpediente = idRecordExpediente;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tb_tipo_record_id_tipo_record", nullable = false)
	public TbTipoRecord getTbTipoRecord() {
		return this.tbTipoRecord;
	}

	public void setTbTipoRecord(TbTipoRecord tbTipoRecord) {
		this.tbTipoRecord = tbTipoRecord;
	}

	@Column(name = "emisario", length = 128)
	public String getEmisario() {
		return this.emisario;
	}

	public void setEmisario(String emisario) {
		this.emisario = emisario;
	}

	@Column(name = "fecha", length = 64)
	public String getFecha() {
		return this.fecha;
	}

	public void setFecha(String fecha) {
		this.fecha = fecha;
	}

	@Column(name = "nombre_record")
	public String getNombreRecord() {
		return this.nombreRecord;
	}

	public void setNombreRecord(String nombreRecord) {
		this.nombreRecord = nombreRecord;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "tbRecord")
	public Set<TbExpedienteHasRecord> getTbExpedienteHasRecords() {
		return this.tbExpedienteHasRecords;
	}

	public void setTbExpedienteHasRecords(
			Set<TbExpedienteHasRecord> tbExpedienteHasRecords) {
		this.tbExpedienteHasRecords = tbExpedienteHasRecords;
	}

}
